#include <Glow.h>

namespace Glow
{
	Glow::Glow(int width, int height, bool fullscreen)
	:_width(width), _height(height), _fullScreen(fullscreen)
	{
		if (glfwInit() == GL_FALSE)
		{
			cerr << "Can't load GLFW Library" << endl;
			exit(EXIT_FAILURE);
		}
	}
	
	Glow::~Glow()
	{
		glfwTerminate();
	}
	
	void Glow::init()
	{
		if(glfwOpenWindow (w_idth, _height, 8,8,8,8,32,32,_fullScreen) == GL_FALSE)
		{
			cerr << "Can't open window" << endl;
			glfwTerminate();
			return false;
		}
	}
	
	void Glow::setWindowPos(int x, int y)
	{
		glfwSetWindowPos(x,y);
	}
	
	void Glow::setWindowSize(int width, int height)
	{
		glfwSetWindowSize(width, height);
	}
	
	void Glow::setWindowTitle(string title)
	{
		glfwSetWindowTitle(title.cstr());
	}
}
